﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

namespace HelperLib
{
   public partial class MoveControl : UserControl
   {
      public MoveControl()
      {
         InitializeComponent();
      }
      public float Speed
      {
         get
         {
            return (float)nud_speed.Value/100f;
         }
         set
         {
            if (value > 1)
               nud_speed.Value = 100;
            else if (value < 0)
               nud_speed.Value = 0;
            else
               nud_speed.Value = (decimal)(value*100f);
         }
      }
      public bool Active
      {
         get
         {
            return cb_Active.Checked;
         }
         set
         {
            cb_Active.Checked = value;
         }
      }
   }
}
